package com.it.park.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.it.park.client.service.ProtocolService;
import com.it.park.dao.ProtocolMapper;
import com.it.park.model.Protocol;

@Service("protocolService")
public class ProtocolServiceImpl extends BaseServiceImpl<Protocol> implements ProtocolService {

	@Autowired
	ProtocolMapper protocolMapper;
	
	@Override
	public boolean deleteByPrimaryKey(Integer id) {
		return protocolMapper.deleteByPrimaryKey(id)==1;
	}

	@Override
	public boolean insert(Protocol record) {
		return protocolMapper.insert(record)==1;
	}

	@Override
	public boolean insertSelective(Protocol record) {
		return protocolMapper.insertSelective(record)==1;
	}

	@Override
	public Protocol selectByPrimaryKey(Integer id) {
		return protocolMapper.selectByPrimaryKey(id);
	}

	@Override
	public boolean updateByPrimaryKeySelective(Protocol record) {
		return protocolMapper.updateByPrimaryKeySelective(record)==1;
	}

	@Override
	public boolean updateByPrimaryKey(Protocol record) {
		return protocolMapper.updateByPrimaryKey(record)==1;
	}

	@Override
	public List<Protocol> selectAll() {
		return protocolMapper.selectAll();
	}

	@Override
	public Protocol selectLatestProtocol() {
		return protocolMapper.selectLatestProtocol();
	}

}
